package com.lrs.java.designPattern.behavioral.strategy;

public class DiscountContext {

	private double price;
	private DiscountStrategy strategy;
	
	public DiscountContext(double price, DiscountStrategy strategy) {
		this.price = price;
		this.strategy = strategy;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}
	
	public void setStrategy(DiscountStrategy strategy) {
		this.strategy = strategy;
	}

	public double calcCommodity() {
		return strategy.calcPrice(price);
	}


	
}
